package jgl.vajra.kingkong.part.mine.viewModel;

import java.util.Map;

import jgl.vajra.kingkong.bean.LoginInfoBean;
import jgl.vajra.kingkong.part.mine.contract.PersonalInformationContract;
import jgl.vajra.kingkong.part.mine.model.PersonalInformationModel;
import jgl.vajra.kingkong.widget.mvvm.factory.CreateModel;
import jgl.vajra.kingkong.widget.retrofithelper.rxsubscriber.ProgressObserver;

@CreateModel(PersonalInformationModel.class)
public class PersonalInformationViewModel extends PersonalInformationContract.ViewModel{
    @Override
    public void getMineData(Map<String, Object> map) {
        mModel.getMineData(map).subscribe(new ProgressObserver<LoginInfoBean>(true,this) {
            @Override
            public void _onNext(LoginInfoBean data) {
                mView.returnMineData(data);
            }

            @Override
            public void _onError(String errorMessage, int errorCode) {
                super._onError(errorMessage, errorCode);
            }
        });
    }
}
